#include <stdio.h>
#include <stdlib.h>

int main()
{
    int n,x;
    int fan(int n);
    while(scanf("%d",&n)!=EOF)
    {
        x=fan(n);
        printf("%d",x);
    }
    return 0;
}
int fan(int n)
{
    int t=0,a[100],i=0,j,k=1;
    while(n!=0)
    {
        a[i]=n%10;
        n=n/10;
        i++;
    }
    for(j=i-1;j>=0;j--)
    {
        t=t+k*a[j];
        k=k*10;
    }
    return t;
}
